package com.eric.ipc;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.eric.ipc.aidl.AIDLActivity;
import com.eric.ipc.binder.BinderActivity;

public class MainActivity extends Activity {
	private Button mBinderBtn;
	private Button mAIDLBtn;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		
		mBinderBtn = (Button)findViewById(R.id.binder);
		mAIDLBtn = (Button)findViewById(R.id.aidl);

		mBinderBtn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(getApplicationContext(), BinderActivity.class);
				startActivity(intent);				
			}
		});
		mAIDLBtn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(getApplicationContext(), AIDLActivity.class);
				startActivity(intent);				
			}
		});
	}
}
